import { http } from './service.js'

export const getDocuments = (params) => {
	return http.request({
		url: '/api/documents/list',
		method: 'GET',
		params: params
	})
}

export const getDocument = (id) => {
	return http.request({
		url: '/api/documents',
		method: 'GET',
		params: {
			'id': id
		}
	})
}

export const getDocumentDirs = (type, pageNum, pageSize) => {
	return http.request({
		url: '/api/document_dir/list',
		method: 'GET',
		params: {
			'type': type,
			'pageNum': pageNum,
			'pageSize': pageSize
		}
	})
}

export const getDocumentDir = (id) => {
	return http.request({
		url: '/api/document_dir',
		method: 'GET',
		params: {
			'id': id
		}
	})
}